﻿using System;
using HiTeachers.Entities;
using HiTeachers.Services;

namespace HiTeachers.Web
{
    public partial class unsubscribe : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var tchId = new Guid(Request["tchid"]);

            Teacher teacher = TeacherServices.GetById(tchId);
            teacher.IsReceiveNews = false;

            TeacherServices.SaveOrUpdate(teacher);
        }
    }
}
